<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--[if lt IE 7 ]> <html class="no-js ie6"> <![endif]-->
<!--[if IE 7 ]>    <html class="no-js ie7"> <![endif]-->
<!--[if IE 8 ]>    <html class="no-js ie8"> <![endif]-->
<!--[if IE 9 ]>    <html class="no-js ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!-->
<html class="no-js">
<!--<![endif]-->
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
    <title>体检预约服务平台 - 医通在线</title>
    <link href="templates/css/global.css" rel="stylesheet" type="text/css" />
    <link href="templates/css/agency.css" rel="stylesheet" type="text/css" />
    <script src="templates/js/form.js" type="text/javascript"></script>
    <script src="templates/js/common.js" type="text/javascript"></script>
    <script src="templates/js/append.js" type="text/javascript"></script>
    <meta content="" name="Keywords">
    <meta name="description" content="" />
    <!--[if IE 6]>
    <script src="templates/js/ddpng.js" type="text/javascript"></script>
    <script type="text/javascript">DD_belatedPNG.fix('.ddpng');</script>
    <![endif]-->
    <script type="text/javascript">
        var userInfo = "<{$userInfo1}>";
    </script>
</head>
<body>

<!--header st-->
<{include file="../templates/$newtpl/header.html"}>

<div class="row mb10 center_layout fix">
    <{include file="../templates/$newtpl/left.html"}>
    <div class="grid0 grid770">
        <div class="main_con main_nobd">
            <div class="subline subline_2 fix">
                <h4>员工预约</h4>
                <h4>
                    <span style="color:red; margin-left: 10px;">
                        （若您要改约套餐，请取消后，再重新预约，或拨打400-820-6772-1-3）
                    </span>
                </h4>
            </div>
            <table class="com_table mb10">
                <thead>
                    <tr>
                        <th width="110">订单号</th>
                        <th width="210">套餐名称</th>
                        <!--
                        <th width="90">加项</th>
                        -->
                        <th width="80">员工</th>
                        <th width="80">预约日期</th>
                        <th width="80">预约门店</th>
                        <th width="40">预约状态</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <{if $info|@count neq 0}>
                <{foreach from=$info item=ac_info}>
                <{if $ac_info.order_id!=''}>
                <tbody>
                    <tr>
                        <td><{$ac_info.order_id}></td>
                        <td>
                            
                            <{if $ac_info.p_url}>
                                <a href="<{$ac_info.p_url}>" target="_blank">
                                    <{if strstr($ac_info.pname,"员工套餐") && strstr($ac_info.pname,"女") }>
                                       员工套餐（女）
                                     <{elseif strstr($ac_info.pname,"员工套餐") && strstr($ac_info.pname,"男") }>
                                       员工套餐（男）
                                     <{elseif strstr($ac_info.pname,"派遣套餐") && strstr($ac_info.pname,"男") }>
                                       派遣套餐（男）
                                     <{elseif strstr($ac_info.pname,"派遣套餐") && strstr($ac_info.pname,"女") }>
                                       派遣套餐（女）
                                    <{else}>
                                       <{$ac_info.pname}>
                                    <{/if}>

                                </a>
                                <{if $ac_info.jx_list|@count neq 0}>
                                    <{if $ac_info.addon_status==1}><font color="#FF0000">（加项未支付）</font><{/if}>
                                    <{if $ac_info.addon_status==2}><font color="#FF0000">（加项已支付）</font><{/if}>
                                    <{if $ac_info.addon_status==3}>加项已预约<{/if}>
                                    <{if $ac_info.addon_status==4}>加项已完成<{/if}>
                                    <{if $ac_info.addon_status==5}><font color="#FF0000">（加项已退款）</font><{/if}>
                                    <{if $ac_info.addon_status==6}><font color="#FF0000">（加项已关闭）</font><{/if}>
                                <{/if}>

                            <{else}>

                                <{if $user_lizhi == 2}>
                                    已离职
                                <{else}>
                                    <{if strstr($ac_info.pname,"员工套餐") && strstr($ac_info.pname,"女") }>
                                       员工套餐（女）
                                     <{elseif strstr($ac_info.pname,"员工套餐") && strstr($ac_info.pname,"男") }>
                                       员工套餐（男）
                                     <{elseif strstr($ac_info.pname,"派遣套餐") && strstr($ac_info.pname,"男") }>
                                       派遣套餐（男）
                                     <{elseif strstr($ac_info.pname,"派遣套餐") && strstr($ac_info.pname,"女") }>
                                       派遣套餐（女）
                                    <{else}>
                                       <{$ac_info.pname}>
                                    <{/if}>
                                <{/if}>
                            <{/if}>
                        </td>
                        <!--
                        <td>
                            <{if $user_lizhi == 2}>
                                已离职
                            <{else}>
                            <{foreach from=$ac_info.jx_list key=key item=item name=store}>
                                 <{$item}><{if !$smarty.foreach.store.last}>,<{/if}>
                                <{/foreach}>
                              <{/if}>
                        </td>
                    -->
                        <td><{$ac_info.customer_name}></td>
                        <td><{if $ac_info.yy_time==''}>
                            <{if $user_lizhi == 2}>已离职<{else}>未预约<{/if}>
                            <{else}><{$ac_info.yy_time}><{/if}></td>

                        <td><{if $ac_info.store_name==''}>
                                <{if $user_lizhi == 2}>已离职<{else}>未预约<{/if}>
                            <{else}><{$ac_info.store_name}><{/if}></td>
                        <td>
                        <{if $ac_info.status == 2}>
                        <{if $user_lizhi == 2}>已离职<{else}><font color="#FF0000">未预约</font><{/if}>
                        <{else if  $ac_info.append.append_status}>
                        <{if $ac_info.append.append_status == 1 && $ac_info.append.append_ifconfirm == 0}>未支付，预约未生效<{/if}>
                        <{if $ac_info.append.append_status == 1  && $ac_info.append.append_ifconfirm == 1}>已预约<{/if}>
                        <{if $ac_info.append.append_status == 2 && $ac_info.append.append_ifconfirm == 1}><font color="#0000FF">已改约</font><{/if}>
                        <{if $ac_info.append.append_status == 3 && $ac_info.append.append_ifconfirm == 1}><font color="#009900">已完成服务</font>
                        <{if $ac_info.append.append_report_status > 1}>,报告已出<{/if}>
                        <{/if}>
                        <{if $ac_info.append.append_status == 4}>
                            <{if $user_lizhi == 2}>已离职<{else}>已取消<{/if}>
                        <{/if}>
                        <{/if}></td>
                        <td class="option">
                        <{if $ac_info.status == 2 }>
                            <{if $ac_info.guoqi == 0}>
                                <{if $user_lizhi == 2}>
                                <{else}>
                                    <a href="<{$__URL__}>reservation_1&orderid=<{$ac_info.order_id}>" class="btn_org_td">立即预约</a>

                                <{/if}>
                            <{elseif $ac_info.guoqi == 1}>
                                项目已过期
                            <{else}>
                                套餐已过期
                            <{/if}>
                        <{elseif $ac_info.status == 1 }>
                          <{if $user_lizhi <> 2}>
                            <a href="<{$ac_info.payment_code}>" class="btn_org_td" target="_blank">立即支付</a>
                            <{if $ac_info.is_cancle}>
                                <br /><a href="###" onclick="cancle_order('<{$ac_info.order_id}>');" class="">取消预约</a>
                            <{/if}>
                            <{else}>
                            --<br>
                          <{/if}>
                        <{elseif $ac_info.status == 5 || $ac_info.status == 6}>
                            <{if $user_lizhi != 2}>已取消<{/if}>
                        <{else}>
                            <{if $ac_info.append.append_status == 1}>
                                <a href="<{$__URL__}>appendinfo&id=<{$ac_info.append.append_id}>" class=" btn_green_td" target="_blank">预约详情</a><br />
                                <{if $ac_info.append.append_luodan_status <>5}>
                                    <{if $ac_info.luodan_status == 3 or $ac_info.luodan_status == 5 or $ac_info.luodan_status == 2 }>
                                        您的预约已被锁定，如因特殊情况需要改约或取消预约请致电400-820-6772-1-3
                                    <{else}>
                                        <{if $ac_info.guoqi == 0}>
                                            <{if $user_lizhi == 2}>
                                            <{else}>
                                            <{if $ac_info.ifpay == 0}>
                                                <a href="<{$__URL__}>pay&id=<{$ac_info.orderid_addso}>" class="btn_org_td" style="margin-top:10px;"  target="_self">立即支付</a>
                                                <{if $ac_info.is_cancle}>
                                                    <a href="javascript:void(0);" onclick="cancle_order('<{$ac_info.order_id}>');" style="margin-top:10px;" class="btn_org_td">取消预约</a>
                                                <{/if}>
                                            <{else}>
                                                <{if $ac_info.append.append_luodan_status == 1 }>
                                                   
                                                    <a href="javascript:void(0);" oid ="<{$ac_info.append.append_orderid}>" style="margin-top:10px;"  class="btn_org_td btn_cancle_append" >取消预约</a>
                                                <{else}>
                                                    您的预约已被锁定，如因特殊情况需要改约或取消预约请致电400-820-6772-1-3
                                                <{/if}>

                                                <{/if}>
                                            <{/if}>
                                        <{elseif $ac_info.guoqi == 1}>
                                            项目已过期
                                        <{else}>
                                            套餐已过期
                                        <{/if}>

                                    <{/if}>
                                <{/if}>
                            <{/if}>

                            <{if $ac_info.append.append_status == 2}>
                                <a href="<{$__URL__}>appendinfo&id=<{$ac_info.append.append_id}>" class="blue" target="_blank">预约详情</a><br />
                                <{if $ac_info.append.append_luodan_status <>5}>
                                    <{if $ac_info.luodan_status == 3 or $ac_info.luodan_status == 5   or $ac_info.luodan_status == 2}>
                                    您的预约已被锁定，如因特殊情况需要改约或取消预约请致电400-820-6772-1-3
                                    <{else}>

                                        <{if $ac_info.guoqi == 0}>
                                            <{if $user_lizhi == 2}>
                                            <{else}>
                                                <a href="<{$__URL__}>editappend&orderid=<{$ac_info.append.append_orderid}>" style="margin-top:10px;" class="btn_gre_td">立即改约</a>
                                                <{if $ac_info.is_cancle}>
                                                    <br /><a href="###" onclick="cancle_order('<{$ac_info.append.append_orderid}>');" class="">取消预约</a>
                                                <{/if}>
                                            <{/if}>
                                        <{elseif $ac_info.guoqi == 1}>
                                            项目已过期
                                        <{else}>
                                            套餐已过期
                                        <{/if}>

                                    <{/if}>
                                <{/if}>
                            <{/if}>

                            <{if $ac_info.append.append_status == 3}>
                                <a href="<{$__URL__}>appendinfo&id=<{$ac_info.append.append_id}>" class="blue" target="_blank">预约详情</a><br />
                            <{/if}>
                            <{if $ac_info.append.append_status == 4}>
                                <{if $user_lizhi != 2}>已取消<{/if}>
                            <{/if}>
                        <{/if}>

                        <{if $user_lizhi == 2}>已离职<{/if}>
                        </td>
                    </tr>
                </tbody>
                <{/if}>
                <{/foreach}>
                    <{else}>
   <tbody><tr ><td bgColor=#ffffff colspan="8" height="30px" >&nbsp;&nbsp;暂无相应预约记录！</td></tr></tbody>
    <{/if}>
            </table>
            <div class="page">
            <{$pagestring}>
            </div>

            <div class="tip_box1" style="margin-top:15px;">
                <h6>预约状态描述：</h6>
                <p style="color:#666666;">未预约：您未预约您的体检。<br>
        已预约：您已完成了在线预约操作。<br>
        已改约：您已修改过您的预约信息并预约成功。<br>
        已完成服务：体检机构已确认您已完成了体检。<br>
        已完成服务，报告已出：您已可以在预约平台查询到您的电子报告。<br>
                未支付，预约未生效：您升级了套餐或加项但还未付款，预约未生效。
                </p>
            </div>
        </div>
    </div>
</div>

<{include file="../templates/foot.html"}>

<!--脚本如下-->
<script src="templates/js/jquery-1.7.2.min.js" type="text/javascript"></script>
<script src="templates/js/jquery.switchable2.min.js" type="text/javascript"></script>
<script src="templates/js/global.js" type="text/javascript"></script>

<script type="text/javascript">

    $('#slideBox .log_box').switchable({
        triggers: $('#slideBox .tab li a'),
        panels: '.tab_con',
        triggerType: 'click'
    });

    //取消预约按钮被点击
    $(".btn_cancle_append").click(function() {
        var oid = $(this).attr('oid');
        if(oid <= 0 ) {
            alert("非法的订单编号");
            return false;
        }

        //发送ajax请求验证登陆信息
        $.ajax({
            url: "<{$__URL__}>ordercanclenew",
            type: 'GET',
            dataType: 'json',
            data: {orderid: oid },
            beforeSend: function () {

            },
            success: function(data) {
                //请求发送成功
                if( 1 == data.status ) {
                    alert("取消预约成功!");
                    window.location.reload();
                } else {
                    //遇到错误 ，需要重新刷新验证码
                    alert(data.info);
                }
            },
            complete: function() {
                //请求完成，响应的事件 : 关闭 登陆中…… 窗口
            },
            error: function(XMLHttpRequest) {
                //请求过程中发生了错误，记录下错误的代码 例如 : 404 => page not found
                alert("请求遇到了错误 , 错误代码 : " + XMLHttpRequest.status);
            }
        });
    });
</script>

</body>
</html>